package com.test.map;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import com.test.map.sign.BaseActivity;

import java.util.ArrayList;

public class Finish_order extends BaseActivity {

    private TextView id;//司机姓名
    private TextView car_id;//车牌号
    private TextView passenger;//乘客姓名
    private String type;//拼车？
    private TextView finished;
    private TextView end_place;//目的地
    private TextView start_place;//起始地
    private TextView cost;//费用

    protected void onCreate(Bundle savedInstanceState) {
        Intent intent=getIntent();
        super.onCreate(savedInstanceState);
        setContentView(R.layout.finish);

        ArrayList<String> infoList = new ArrayList<String>();
        infoList = getIntent().getStringArrayListExtra("order_finish");
        id= (TextView) findViewById(R.id.driver_name);
        car_id= (TextView) findViewById(R.id.car_code);
        passenger= (TextView) findViewById(R.id.people);

        finished= (TextView) findViewById(R.id.finish);
        end_place= (TextView) findViewById(R.id.desplace);
        start_place= (TextView) findViewById(R.id.aimplace);
        cost= (TextView) findViewById(R.id.cost);

        id.setText("司机："+infoList.get(0));
        car_id.setText("车型："+infoList.get(1)+"  "+infoList.get(2));

        if (infoList.get(4).equals("true"))
            type="拼单";
        else type="单人";

        passenger.setText("乘客："+infoList.get(3)+"/"+type);


        if (infoList.get(5).equals("true"))
            finished.setText("订单完成");
        else finished.setText("订单未完成");
        end_place.setText("目的地："+infoList.get(6));
        start_place.setText("起始地："+infoList.get(7));
        cost.setText("费用："+infoList.get(8));


    }
}
